<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');

if (!function_exists('set_cookie')) {
	function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL)
	{
		get_instance()->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly);
	}
}

if (!function_exists('get_cookie')) {
	function get_cookie($index, $xss_clean = NULL)
	{
		is_bool($xss_clean) || ($xss_clean = config_item('global_xss_filtering') === true);
		$prefix = (isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'));
		return get_instance()->input->cookie($prefix . $index, $xss_clean);
	}
}

if (!function_exists('delete_cookie')) {
	function delete_cookie($name, $domain = '', $path = '/', $prefix = '')
	{
		set_cookie($name, '', '', $domain, $path, $prefix);
	}
}

?>
